import React, {Component} from 'react';
import {Tabs} from "antd-mobile";
import './index.css'

class SubNav extends Component {
    render() {
        const {subnavs} = this.props;
        return (
            <div className={'subnav_component'}>
                <Tabs>
                    {subnavs.map((tab,index)=>{
                        return <Tabs.Tab key={index} title={<div className={'box'}>
                            <div className={'item'}>
                                <i className={'iconfont '+tab.icon}></i>
                            </div>
                            <div className={'txt'}>{tab.title}</div>
                        </div>}>
                        </Tabs.Tab>
                    })}
                </Tabs>
            </div>
        );
    }
}

export default SubNav;